{extend name='common@layout/base' /}
{block name='breadcrumb'}
<div class="nch-breadcrumb-layout">
    <div class="nch-breadcrumb wrapper">
        <i class="icon-home"></i>
        <span><a href="/">首页</a></span><span class="arrow">></span>
        <span><a href="{:url('member/index/index')}">我的企业</a></span><span class="arrow">></span>
        <span>我的消息</span>
    </div>
</div>
{/block}
{block name='content'}
<div class="ncm-container">
    {include file='common@layout/member_left' /}
    <div class="right-layout">

<div class="wrap">
  <div class="tabmenu">
    <ul class="tab">
      <?php if(is_array($member_menu) and !empty($member_menu)) {
	foreach ($member_menu as $key => $val) {
		$classname = 'normal';
		if($val['menu_key'] == $menu_key) {
			$classname = 'active';
		}
		if ($val['menu_key'] == 'message'){
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'(<span style="color: red;">'.$newcommon.'</span>)</a></li>';
		}elseif ($val['menu_key'] == 'system'){
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'(<span style="color: red;">'.$newsystem.'</span>)</a></li>';
		}elseif ($val['menu_key'] == 'close'){
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'(<span style="color: red;">'.$newpersonal.'</span>)</a></li>';
		}else{
			echo '<li class="'.$classname.'"><a href="'.$val['menu_url'].'">'.$val['menu_name'].'</a></li>';
		}
	}
}?>
    </ul>
    <?php if ($output['isallowsend']){?>
    <a href="/?s=member/message/sendmsg" title="发送站内信" class="new_btn new_red_btn pa" style="top: -2px;right: 1px;"><i class="icon-envelope-alt"></i>发送站内信</a>
    <?php }?>
  </div>
  <table class="ncm-default-table">
    <thead>
      <tr>
        <th class="w30"></th>
        <th class="w100 tl">收信人</th>
        <th class="tl">内容</th>
        <th class="w300">最后更新</th>
        <th class="w110">操作</th>
      </tr>
      <?php if (!empty($message_array)) { ?>
      <tr>
        <td colspan="20"><input type="checkbox" id="all" class="checkall"/>
          <label for="all"><?php echo $lang['home_message_select_all'];?></label>
          <a href="javascript:void(0)" class="ncm-btn-mini" uri="/?s=member/message/dropcommonmsg&drop_type=<?php echo $drop_type; ?>" name="message_id" confirm="您确实要删除该站内信吗?" nc_type="batchbutton"><i class="icon-trash"></i><?php echo $lang['home_message_delete'];?></a></td>
      </tr>
      <?php } ?>
    </thead>
    <tbody>
      <?php if (!empty($message_array)) { ?>
      <?php foreach($message_array as $k => $v){ ?>
      <tr class="bd-line">
        <td><input type="checkbox" class="checkitem" value="<?php echo $v['message_id']; ?>"/></td>
        <td class="tl"><?php echo $v['to_member_name']; ?></td>
        <td class="tl"><?php echo $v['message_body']; ?></td>
        <td><?php echo @date("Y-m-d H:i:s",$v['message_time']); ?></td>
        <td class="ncm-table-handle"><span><a href="javascript:void(0)" onclick="ajax_get_confirm('您确实要删除该站内信吗?', '/?s=member/message/dropcommonmsg&drop_type=<?php echo $drop_type; ?>&message_id=<?php echo $v['message_id']; ?>');" class="btn-red"><i class="icon-trash"></i>
          <p><?php echo $lang['home_message_delete'];?></p>
          </a></span></td>
      </tr>
      <?php } ?>
      <?php } else { ?>
      <tr>
        <td colspan="20" class="norecord"><div class="warning-option"><i>&nbsp;</i><span>暂无符合条件的数据记录</span></div></td>
      </tr>
      <?php } ?>
    </tbody>
    <tfoot>
      <?php if (!empty($message_array)) { ?>
      <tr>
      <td colspan="20"><div class="pagination"><?php echo $show_page; ?></div></td>
    </tr>
    <?php } ?>
      </tfoot>

  </table>
</div>


    </div>
    <div class="clear"></div>
</div>
{/block}